

    const state = {
        username: ''
    }

    const getters = {
        isLogin (state) {
            if(state.token === '') {
                return false
            }
            else {
                return true
            }
        },
        getUsername (state) {
            return state.username
        }
    }
    const actions = {}
    const mutations = {
        setUsername (state, username) {
            state.username = username
        }
    }

    export default {
        namespace: true,
        state,
        getters,
        actions,
        mutations
    }